import request from '@/utils/request'
import qs from 'qs'

// 读取回收站信息
export function siteTreeList(params) {
  return request({
    url: '/site/treeList',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'GET',
    params: params
  })
}
// 读取回收站信息
export function getRecycleInfo(data) {
  return request({
    url: '/site/getRecycleInfo',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: qs.stringify(data)
  })
}
//读取回收站栏目信息
export function getRecycleColumn(data) {
  return request({
    url: '/site/recycleChannels',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: qs.stringify(data)
  })
}
//从回收站删除栏目信息
export function delRecycleColumn(data) {
  return request({
    url: '/site/deleteForEver_C',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: qs.stringify(data)
  })
}

//从回收站还原栏目信息
export function recycleRecycleColumn(data) {
  return request({
    url: '/site/recycle_C',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: qs.stringify(data)
  })
}

//读取回收站文章信息
export function getRecycleArticle(data) {
  return request({
    url: '/site/recycleArticles',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: qs.stringify(data)
  })
}
//从回收站删除文章
export function delRecycleArticle(data) {
  return request({
    url: '/site/deleteForEver_A',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: qs.stringify(data)
  })
}
//从回收站还原文章
export function recycleRecycleArticle(data) {
  return request({
    url: '/site/recycle_A',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: qs.stringify(data)
  })
}
//读取回收站用户的文章信息
export function personRecycleArticle(data) {
  return request({
    url: '/site/userRecycleArticles',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: qs.stringify(data)
  })
}


//读取回收站模板信息
export function getRecycleTemplateInfo(data) {
  return request({
    url: '/site/recycleTemplates',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: qs.stringify(data)
  })
}
//从回收站还原模板
export function restoreTemplate(data) {
  return request({
    url: '/site/recycle_T',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: qs.stringify(data)
  })
}
//从回收站彻底删除模板
export function deleteTem(data) {
  return request({
    url: '/site/deleteForEver_T',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: qs.stringify(data)
  })
}
// 读取回收站站点信息
export function recycleSiteList() {
  return request({
    url: '/site/recycleSites',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'post',
  })
}
// 从回收站还原栏目
export function recycle_S(data) {
  return request({
    url: '/site/recycle_S',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: qs.stringify(data)
  })
}
// 从回收站删除网站
export function deleteForEver_S(data) {
  return request({
    url: '/site/deleteForEver_S',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: qs.stringify(data)
  })
}
